﻿#pragma once
#include "Generation/Piecemeal/Vec.h"

class FVecSet_Iterator
{
	friend class FVecSet;

	using pointer = FVec*;
	using reference = FVec&;

public:
	FVecSet_Iterator(FVecSet& vecset, int constructType);

	reference operator*();
	FVecSet_Iterator& operator++();

	friend bool operator==(const FVecSet_Iterator& a, const FVecSet_Iterator& b)
	{
		// UE_LOG(LogTD, Error, TEXT("Operator== %d %d , %d %d"), a.x, a.y, b.x, b.y);
		return *a.m_Ptr == *b.m_Ptr;
	};

	friend bool operator!=(const FVecSet_Iterator& a, const FVecSet_Iterator& b)
	{
		// UE_LOG(LogTD, Error, TEXT("Operator!= %d %d,  %d %d"), a.x, a.y, b.x, b.y);
		return !(*a.m_Ptr == *b.m_Ptr);
	};

private:
	FVecSet* m_VecSet;
	int x;
	int y;

	pointer m_Ptr;

private:
	bool MoveNext();
};
